import { Controller } from '@nestjs/common';
import { EventPattern, MessagePattern } from '@nestjs/microservices';
import { FileService } from './file.service';

@Controller('file')
export class FileController {
  constructor(private readonly fileService: FileService) {}

  @MessagePattern('app-info-message')
  analyzeApk(data: { url: string; type: number }) {
    console.log(data);
    return this.fileService.getAppInfo();
    // return { info: {} };
  }

  @EventPattern('app-info-event')
  handleAppInfo(): void {
    // console.log('');
  }
}
